#!/usr/bin/env python
# -*- coding: utf-8 -*-
from nubox import NdArray, NuBox
from nubox.char import CharArray
from nubox.const import CHAR_DUMMY

array = NdArray([72, 69, 76, 76, 79, 87, 79, 82, 76, 68], shape=(2, 5), typecode='b')
print "(in the array) the element in the first column of the second row is: %s" % array[(1, 0)]

box = NuBox(array.data, shape=(2, 5, 1), typecode='b', dummy=CHAR_DUMMY)
print "(int the nubox) the symbol in the first position of the first column of the second row is: %s" % chr(box[(1, 0, 0)])

print "the cryptic messege is:"
ca = CharArray(box)
print ca[0]
print ca[1]
